---
sidebar_label: 'LangChain Adapter'
---

import Link from '@docusaurus/Link';
import {CodeEditor} from '@site/src/components/CodeEditor/CodeEditor';
import app from './0004-langchain-langserve-adapter/app';
import personas from './0004-langchain-langserve-adapter/personas';

# LangChain LangServe Adapter

[LangChain](https://www.langchain.com/) is a new and popular framework for building services powered by
Large Language Models. It enables applications that are context-aware. It also provides a library called
[LangServe](https://python.langchain.com/docs/langserve) to create standardized APIs that can be used to
interact with LangChain runnables.

This example illustrates how to use `NLUX` to connect to a LangChain runnable made available through LangServe.

<CodeEditor
    files={{
        'App.tsx': app,
        'personas.tsx': personas,
    }}
    editorHeight={380}
    simulatedPrompt={'What\'s the best human food treats to feed a pirate parrot to keep him happy during long voyages at sea?'}
/>

<br />
This example focuses on the frontend integration between LangServe and `NLUX`. If you are interested in seeing
the backend code that enabled this demo, you can check this [repository](https://github.com/nlkitai/pynlux),
which contains Python LangServe API code.

---

<Link className="learn-more-link button button--secondary" to="/learn/adapters/langchain">Learn More About NLUX LangChain Adapter</Link>
